This invention relates generally to a data telecommunications system, and more particularly to a system which transmits data in packets, the size of which may be changed based on transmitting conditions. The invention also relates to the efficient establishment of a data transfer link between two microcomputers over telephone lines. The subject matter of the present invention is particularly effective in data transfers in which the line quality may be poor or may rapidly change from good quality to poor quality. An example of this is cellular communications, which presents widely varying degrees of line quality, although cellular communications is not the only medium in data communications in which line quality may be poor or may vary. Telephone lines also possess such qualities.
Whereas microcomputers were once only used as dedicated and completely isolated devices, they are now used for a wide range of applications, many of which require microcomputers to communicate with each other. Problems develop with such communication because of the existence of a wide variety of microcomputers which are incapable of directly communicating with each other. As a result, many data communication systems for microcomputers force the microcomputer to work principally as a dumb terminal for a remote mini- or mainframe computer. Therefore, to facilitate more sophisticated communication, communication protocols which enable data communications between a wide range of computers, from low end microprocessors to large mainframes, have been developed. The proliferation of protocols, however, not to mention operating systems and microprocessors, has for the most part precluded the adoption of a standard file transfer method.
A communication protocol is basically a set of rules that defines how the computers interact. For two computers to transfer a file successfully, they must observe the same protocol. Typically, a protocol specifies when to send a message, how to format the information in the message, and at the other end, how to acknowledge the receipt of the message.
Simple physical connect protocols are concerned only with hardware configurations. Establishing the basic physical connection between two computers requires that a particular series of steps be followed. The originating modem initiates its sending sequence, and the telephone number representing the electronic address of the receiving modem is formatted as a series of pulses or tones and sent into the telephone network. The receiving modem senses the incoming call as a relatively high voltage (sufficient to cause a phone to ring) and interprets this as a request to establish a connection. If the connection is established, an acknowledgement message sent to the transmitting modem thereby establishes the connection. Such a physical link is capable of being established because both modems use the same physical connect protocol. These basic connect protocols are fairly standard, particularly for the low speed, asynchronous modems commonly used with microcomputers, such as Bell 103 and 212 A modems. However, as communications become more complex and involve dissimilar machines and file formats, the protocols must, in turn, become increasingly sophisticated.
Connecting two computers is only a small part of the communications work necessary for accurate data transfer. Telephone lines are often noisy, and errors can crop up in the transmitted data. These errors must be detected and corrected. The resources available to store incoming data must also be passed and matched so that the recipient is not flooded with data. Also, information regarding the computer file system must be swapped, and file movement and manipulation must be defined. These concerns, therefore, go beyond the physical-level protocols into the realm of complex communications protocols.
One protocol which enables complex communications between microcomputers is the Microcom Networking Protocol (MNP) which has been developed by Microcom, Inc. of Norwood, Mass. MNP provides a sophisticated communications system which includes provisions for both reliable terminal-type communications and reliable file transfer in a manner which can reasonably be implemented on a wide range of computers. MNP accounts not only for hardware and operating system differences, but also provides sophisticated error checking. As a result, file exchanges are thus possible between almost any computers using an MNP based communication system.
The MNP protocol, which has been developed principally for use with microcomputers, includes three layers, and the use of only three layers enables MNP to provide the necessary services with the desired space and performance characteristics for a microcomputer environment. The three layers or modules are combined to perform a series of complex functions in a manner in which changes in one module may not drastically affect another module, as long as certain parts of the module's interface remain the same.
In MNP, each layer is relatively isolated and provides a specific service. If a change is forced in one layer (for example, if MNP is modified for use on a new computer), the change is confined to that layer while the layer's standard interface to the other layers remains unchanged. In addition to ensuring machine portability, MNP's structure allows services provided by one layer to support those in the layer above. The accumulation of services is then passed upward, from layer to layer to the applications program. MNP defines three unique protocol layers in addition to the physical connection; the link, the session, and the file protocol layers. The protocol layers are triggered sequentially from the bottom (physical) to the top (file transfer).
The link layer is responsible for providing reliable, controlled data transmission over a medium that is inherently noisy and likely to cause errors. Once a physical connection is established between two machines, the link protocol acts as a negotiator causing both computers to agree on the nature of the link. For example, the link protocol establishes whether the connection will be half- or full-duplex, how many data messages can be sent before confirmation is required, the size of a single data packet, etc. After establishing values for the above requirements, the link protocol initiates data transfer, paces the flow of data and, if necessary, re-transmits data messages that contain errors due to telephone line noise. The link protocol allows blocks or packets of data (as opposed to individual bytes) to be send synchronously or asynchronously to the receiving computer. Data transfer is faster when packets are transmitted synchronously because start and stop characters are not needed, and as a result, the ratio of data to control characters regulating the transfer is higher. Control is possible because of a mainframe-like (framing) technique in which a block of data is carried from both ends with specific codes.
The session layer negotiates with the receiving computer with respect to the pertinent system and file information including computer type, how files are formatted, the type of information transmitted (e.g. ASCII, binary) and the user's identity. This layer also provides the automatic negotiation of which level of service can be used between the two communicating devices.
The file transfer layer defines and formats the messages involved in file transfers and manipulations. There are three transfer services available: one allowing the sending of a file, the second allowing the receipt of a file, and the third allowing the appending of a file to an existing file at the other end of the communications link. The file transfer protocol also enables the manipulation of distant computer files. For example, such files can be deleted, renamed or file directories may be displayed. A typical file transfer starts when one computer sends a "file start" message to the other computer. The file start message includes the requested file's name, size and format along with any password needed for the file's return trip to the requesting computer. Both computers exchange "hellos" along with a confirmation that a file will be soon filed by one side and accepted by the other.
In order for any communications protocol to facilitate communications among a wide variety of computers, the protocol must be able to operate in a number of modes. These modes include a matched-protocol mode for use by two communicating devices supporting the same protocol. Such a matched-protocol mode may provide optimized data transmission including any of a number of known optimizing features such as detecting and correcting errors, optimizing transmission speed, etc. A second mode which allows straight forward data transmission (without any optimizing features) between two communicating systems must also be provided. The operating mode is generally negotiated in a lower link layers, and in MNP the mode is selected in the link layer.
A modem operating under the MNP protocol discussed above has four basic modes: reliable mode, normal mode, auto-reliable mode, and direct mode. The reliable mode is the basic matched-protocol mode of MNP which provides error detection and automatic re-transmission of data when an error occurs in order to ensure that communications between two communicating systems are error-free. In order to utilize this reliable mode, however, both of the communicating modems must be able to support this mode. A second mode, MNP's normal mode, allows a modem with MNP to communicate with a modem not supporting this protocol. MNP's auto-reliable mode is an extension of the reliable mode which will automatically connect two modems in a reliable mode if such a connection is possible. In other words, if both of the communicating modems can support MNP, a reliable, error-correcting connection is established. The auto-reliable mode differs from the reliable mode insofar as the modem in the auto-reliable mode initially looks for incoming MNP protocol characters from the remote modem. If, after a predetermined amount of time has expired, these MNP characters are not detected, a normal link is established. If these characters are detected, a reliable link is established. A fourth mode, the direct mode, is used for special purpose formats or character sets, and the modem buffers and flow control command settings are ignored.
A fifth mode, a subset of auto-reliable mode, called the special or smart auto-reliable mode, contains a special or "fallback" character or set of characters which indicate that a non-matched protocol should be established. The features of the special or smart auto-reliable mode are described and claimed in U.S. Pat. No. 4,680,773 for "Data Communications System and Method Utilizing a Multi-Mode Modem", assigned to the assignee of the present invention, the disclosure of which is hereby incorporated by reference. One aspect of the present invention is a subset of both auto-reliable and special auto-reliable modes, and is especially effective when telephone line quality may have deteriorated. This mode, entitled Robust Auto-Reliable mode, is explained in greater detail below.
Data sent from one modem to another is usually transmitted as part of a data packet, the size of which is determined by the link layer. Data packets generally include, in addition to the data, header and trailer data which among other purposes identifies the beginning (header) and end (trailer) of each data packet. The header and trailer information may also be used for indicating the type of packet (e.g. acknowledgement, control, data packet), the CRC code, and any other identifying information. While the data packets are very useful for maintaining error-free transmission, the header and trailer information increases the amount of data transmitted and as a result data throughput is reduced.
In order to increase the data transmission rate or throughput, many techniques involving the manipulation of the transmitted data are utilized. One such technique is to increase the size of the packets of data which are sent by a modem. Such increased packet size produces an increase in throughput because there is less header and trailer information sent since fewer packets are actually transmitted. U.S. Pat. No. 4,691,314, owned by the assignee of the present invention, discloses and claims a system for transmitting data in adjustable-sized packets, of which the present invention is an improvement upon.
while ideally such increased packet size should speed transmission, the nature of the transmitting environment may lead to the opposite result. Since telephone lines are often noisy (present, for example, in cellular communications in which not only may line quality be poor, but also that it may be erratic and rapidly fluctuate between good and poor line quality) and other hardware problems produce errors in the transmitted data, it is often necessary when using an error-correcting protocol to re-transmit many packets of data which contain data errors. The re-transmission of larger sized packets thereby results in unnecessary transmission of data because for each altered transmitted character many more correctly transmitted characters must be re-transmitted thereby decreasing throughput. Therefore, if many data packets are re-transmitted, smaller packet sizes are actually beneficial since less data has to be re-transmitted.
Known modems which transmit data in packets are designed so that the packet size is chosen which compromises the advantages of large packet sizes with the advantages of small packet sizes. The nature of the transmitted data, as well as the transmitting conditions, however, frequently change so that any particular packet size will, in reality, not be optimum for all situations.
It is therefore a principal object of the present invention is to provide a data transmission system and method in which the packet size of the data being sent by a modem over telephone lines is optimized.
Another object of the present invention is to provide a data communication system and method in which the data packet size can be optimized in a real time as a function of the data stream being transmitted as well as the transmitting environment using additional idle packets.
Still another object of the present invention is to provide a data communications system and method in which data may be transmitted in any of a number of packet sizes
Yet another object of the present invention is to provide a data communications system and method in which an additional mode of operation may be selected to connect two modems over telephone lines which is especially effective for conditions when line quality may not be optimum.